macos: fix typo when creating scroll events
authorChristian Hergert <chergert@redhat.com>
Thu, 3 Dec 2020 21:44:14 +0000 (13:44 -0800)
committerChristian Hergert <chergert@redhat.com>
Thu, 3 Dec 2020 21:46:47 +0000 (13:46 -0800)
This fixes an issue where we would ignore events with Y delta
and no X delta while scrolling due to a typo when checking for
any delta.

This fixes deceleration of kinetic scrolling on the macOS backend.

Fixes #3418

gdk/macos/gdkmacosdisplay-translate.c

index f895db9686d1b07de3186dc7e100caaeb2c431cf..5f5eeffdcfb3afc1cf2dc524cc19780299a4e2e8 100644 (file)
@@ -610,7 +610,7 @@ fill_scroll_event (GdkMacosDisplay *self,
       sx = [nsevent scrollingDeltaX];
       sy = [nsevent scrollingDeltaY];
 
-      if (sx != 0.0 || dx != 0.0)
+      if (sx != 0.0 || sy != 0.0)
         ret = gdk_scroll_event_new (GDK_SURFACE (surface),
                                     pointer,
                                     NULL,